Admin Task Registry entry
Add an admin task to the Admin Tasks module. An Admin Task can be selected by authorised users in the EMu client to run a task on the server.
Admin Tasks can be run from the EMu client to perform a wide range of server functions. They can:
- Execute a command on the server to alter server-based files.
- Run a server-side report and display output on the client machine.
- Create a report that takes user input. An Admin Task can ask the user to provide values to be used as variables for the server-side script.
When is selected in the Command Centre, the Admin Tasks window displays with a list of tasks accessible to the current user and grouped by module:
Usage
This Registry entry can be assigned to users and groups:
Key | User | Group | Group |
---|---|---|---|
Key 1 | User
|
Group
|
Group
|
Key 2 | user | group | Default
|
Key 3 | Table
|
||
Key 4 | table | ||
Key 5 | Admin Task
|
||
Key 6 | task | ||
Value | script |
User
|
user | Table
|
table | Admin Task
|
task | script |
Group
|
group | Table
|
table | Admin Task
|
task | script |
Group
|
Default
|
Table
|
table | Admin Task
|
task | script |
where:
table |
identifies the module heading under which the task will be listed in the Admin Tasks window. The format of table is the table's back-end name (e.g. eparties, emultimedia, etc.), but it will display in the Admin Tasks window as the module name (e.g. Parties, Multimedia). A special table name of eadmin is used to add entries under the Admin virtual module. |
|||||||||||||||||||||||
task |
is the name of the task as it is listed in the Admin Tasks window under the module heading. |
|||||||||||||||||||||||
script |
is the script that is run when task is selected in the Admin Tasks window. The format of script is: {output format} command where: |
|||||||||||||||||||||||
|
- Write the script that is to be run by the Admin Task.
- Place the script on the EMu server in the
admin
directory with 755 permissions.Where do my Admin Tasks scripts go?Admin Tasks scripts should be placed in the
admin
directory on the EMu server. This directory is part of the standard PATH setup for EMu on the server, hence absolute path names are not required. Upgrades of EMu do not remove files located in theadmin
directory.Furthermore, emusync will not remove client specific commands found in the
admin
directory (unlike thebin
andutils
directories), but will add commands found in the master client. Client specific Admin Tasks (that is tasks specific to a given client, as opposed to general purpose) should be placed in the client'sadmin
directory. - Create an Admin Task Registry entry to add the new task to the Admin module.
The following is an example of a Registry entry that creates a new Admin task:
Key | Setting | Description |
---|---|---|
Key 1 | Group
|
|
Key 2 | Manager | |
Key 3 | Table
|
|
Key 4 | eadmin
|
Name of the table on which to run the Admin Task.
|
Key 5 | Admin Task
|
|
Key 6 | List ISO-8859 Characters
|
Name of the task as it will be listed in the Admin Tasks window. |
Value | listchars
|
Name of the script that runs the Admin Task. |
This entry will display a Crystal Report listing possible duplicate records:
Key | Setting |
---|---|
Key 1 | Group
|
Key 2 | Default
|
Key 3 | Table
|
Key 4 | eparties
|
Key 5 | Admin Task
|
Key 6 | View Duplicate Report
|
Value | {Run ODBC Crystal/crystal.exe %f duplicate_a4.rpt}duplicatereport eparties [number:Enter Year] [number: Enter Month] [number:Enter Day]
|
The View Duplicate Report task will be listed in the Admin Tasks module under the Parties heading. When the task is selected:
- A dialogue box will display requesting input from the user.
- The user's input is passed to the script called duplicatereport, which resides in the admin directory.
- The output of the duplicatereport script is saved under the ODBC Data Source for the eparties module.
- Crystal/crystal.exe is then executed and passed the
duplicate_a4.rpt
file to execute. - Typically the Crystal report file will use the output of the script executed (duplicatereport in this example) to create a report that is then viewable.
This entry is used to run a script clearematchlist on the server that requires no input from, or output to, the user:
Key | Setting |
---|---|
Key 1 | Group
|
Key 2 | Default
|
Key 3 | Table
|
Key 4 | eadmin
|
Key 5 | Admin Task
|
Key 6 | Clear Matchlist Database
|
Value | clearematchlist
|